<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>HTML::Parser - HTML parser class - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of HTML-Parser - MetaCPAN" href="https://metacpan.org/dist/HTML-Parser/releases.rss" />
        <link rel="canonical" href="./HTML::Parser.html" />
        <meta name="description" content="HTML parser class" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/HTML::Parser" />
<meta name="twitter:title"       content="HTML::Parser" />
<meta name="twitter:description" content="HTML parser class" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./HTML::Parser.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of HTML-Parser was released.">
      <span class="relatize">31 Jan 2023 03:13:18 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/HTML-Parser">HTML-Parser</a>
  </li>
  <li>
    Module version: 3.81
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/HTML-Parser/source/lib/HTML/Parser.pm">Source</a>
    (<a href="https://metacpan.org/dist/HTML-Parser/source/lib/HTML/Parser.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/HTML-Parser/source/lib/HTML">Browse</a>
    (<a href="https://metacpan.org/dist/HTML-Parser/source/lib/HTML?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/HTML-Parser/changes">Changes</a>
    </li>
    <li>
      <a rel="noopener nofollow" class="nopopup" href="https://github.com/libwww-perl/HTML-Parser">Homepage</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/HTML-Parser/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/libwww-perl/HTML-Parser">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/libwww-perl/HTML-Parser/issues">Issues</a>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=HTML-Parser+3.81" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/H/HTML-Parser.html?oncpan=1&amp;distmat=1&amp;version=3.81&amp;grade=2" style="color: #090">3254</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/H/HTML-Parser.html?oncpan=1&amp;distmat=1&amp;version=3.81&amp;grade=3" style="color: #900">3</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/H/HTML-Parser.html?oncpan=1&amp;distmat=1&amp;version=3.81&amp;grade=4">3</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/OALDERS/HTML-Parser-3.81">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on HTML-Parser who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 5
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/HTML-Parser-3.81/index.html">83.57% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.8.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/HTML-Parser/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.81.tar.gz">
      Download (<span itemprop="fileSize">144.87KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FOALDERS%2FHTML-Parser-3.81%2Flib%2FHTML%2FParser.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/HTML-Parser/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/HTML-Parser/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:HTML-Parser">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="HTML-Parser">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/HTML/Parser.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="OALDERS/HTML-Parser-3.81"
>3.81
  (OALDERS on 2023-01-31)</option>
<option
  
  value="OALDERS/HTML-Parser-3.80"
>3.80
  (OALDERS on 2022-11-01)</option>
<option
  
  value="OALDERS/HTML-Parser-3.79"
>3.79
  (OALDERS on 2022-10-12)</option>
<option
  
  value="OALDERS/HTML-Parser-3.78"
>3.78
  (OALDERS on 2022-03-28)</option>
<option
  
  value="OALDERS/HTML-Parser-3.77"
>3.77
  (OALDERS on 2022-03-14)</option>
<option
  
  value="OALDERS/HTML-Parser-3.76"
>3.76
  (OALDERS on 2021-03-04)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.75"
>3.75
  (CAPOEIRAB on 2020-08-30)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.74"
>3.74
  (CAPOEIRAB on 2020-08-30)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.73"
>3.73
  (CAPOEIRAB on 2020-08-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.72"
>3.72
  (GAAS on 2016-01-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.71"
>3.71
  (GAAS on 2013-05-08)</option>
<option
  
  value="KIMURA/HTML-Parser-3.25-bin-1-Mac"
>3.25-bin-1-Mac
  (KIMURA on 2001-06-12)</option>
<option
  
  value="KIMURA/HTML-Parser-3.23-bin-1-Mac"
>3.23-bin-1-Mac
  (KIMURA on 2001-05-05)</option>
<option
  
  value="KIMURA/HTML-Parser-3.19-bin-1-Mac"
>3.19-bin-1-Mac
  (KIMURA on 2001-03-16)</option>
<option
  
  value="GAAS/HTML-Parser-2.25"
>2.25
  (GAAS on 1999-11-05)</option>
<optgroup label="BackPAN">'
<option
  
  value="GAAS/HTML-Parser-3.70"
>3.70
  (GAAS on 2013-03-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.69"
>3.69
  (GAAS on 2011-10-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.68"
>3.68
  (GAAS on 2010-09-01)</option>
<option
  
  value="GAAS/HTML-Parser-3.67"
>3.67
  (GAAS on 2010-08-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.66"
>3.66
  (GAAS on 2010-07-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.65"
>3.65
  (GAAS on 2010-04-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.64"
>3.64
  (GAAS on 2009-10-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.63"
>3.63
  (GAAS on 2009-10-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.62"
>3.62
  (GAAS on 2009-08-13)</option>
<option
  
  value="GAAS/HTML-Parser-3.61"
>3.61
  (GAAS on 2009-06-20)</option>
<option
  
  value="GAAS/HTML-Parser-3.60"
>3.60
  (GAAS on 2009-02-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.59"
>3.59
  (GAAS on 2008-11-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.58"
>3.58
  (GAAS on 2008-11-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.57"
>3.57
  (GAAS on 2008-11-16)</option>
<option
  
  value="GAAS/HTML-Parser-3.56"
>3.56
  (GAAS on 2007-01-12)</option>
<option
  
  value="GAAS/HTML-Parser-3.55"
>3.55
  (GAAS on 2006-07-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.54"
>3.54
  (GAAS on 2006-04-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.53"
>3.53
  (GAAS on 2006-04-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.52"
>3.52
  (GAAS on 2006-04-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.51"
>3.51
  (GAAS on 2006-03-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.50"
>3.50
  (GAAS on 2006-02-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.49"
>3.49
  (GAAS on 2006-02-08)</option>
<option
  
  value="GAAS/HTML-Parser-3.48"
>3.48
  (GAAS on 2005-12-02)</option>
<option
  
  value="GAAS/HTML-Parser-3.47"
>3.47
  (GAAS on 2005-11-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.46"
>3.46
  (GAAS on 2005-10-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.45"
>3.45
  (GAAS on 2005-01-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.44"
>3.44
  (GAAS on 2004-12-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.43"
>3.43
  (GAAS on 2004-12-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.42"
>3.42
  (GAAS on 2004-12-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.41"
>3.41
  (GAAS on 2004-11-30)</option>
<option
  
  value="GAAS/HTML-Parser-3.40"
>3.40
  (GAAS on 2004-11-29)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_92"
>3.39_92 DEV
  (GAAS on 2004-11-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_91"
>3.39_91 DEV
  (GAAS on 2004-11-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_90"
>3.39_90 DEV
  (GAAS on 2004-11-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.38"
>3.38
  (GAAS on 2004-11-11)</option>
<option
  
  value="GAAS/HTML-Parser-3.37"
>3.37
  (GAAS on 2004-11-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.36"
>3.36
  (GAAS on 2004-04-01)</option>
<option
  
  value="GAAS/HTML-Parser-3.35"
>3.35
  (GAAS on 2003-12-12)</option>
<option
  
  value="GAAS/HTML-Parser-3.34"
>3.34
  (GAAS on 2003-10-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.33"
>3.33
  (GAAS on 2003-10-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.32"
>3.32
  (GAAS on 2003-10-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.31"
>3.31
  (GAAS on 2003-08-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.30"
>3.30
  (GAAS on 2003-08-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.29"
>3.29
  (GAAS on 2003-08-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.28"
>3.28
  (GAAS on 2003-04-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.27"
>3.27
  (GAAS on 2003-01-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.26"
>3.26
  (GAAS on 2002-03-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.25"
>3.25
  (GAAS on 2001-05-11)</option>
<option
  
  value="GAAS/HTML-Parser-3.24"
>3.24
  (GAAS on 2001-05-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.23"
>3.23
  (GAAS on 2001-05-02)</option>
<option
  
  value="GAAS/HTML-Parser-3.22"
>3.22
  (GAAS on 2001-04-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.21"
>3.21
  (GAAS on 2001-04-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.20"
>3.20
  (GAAS on 2001-04-03)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_94"
>3.19_94 DEV
  (GAAS on 2001-03-30)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_93"
>3.19_93 DEV
  (GAAS on 2001-03-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_92"
>3.19_92 DEV
  (GAAS on 2001-03-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_91"
>3.19_91 DEV
  (GAAS on 2001-03-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_90"
>3.19_90 DEV
  (GAAS on 2001-03-13)</option>
<option
  
  value="GAAS/HTML-Parser-3.19"
>3.19
  (GAAS on 2001-03-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.18"
>3.18
  (GAAS on 2001-02-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.17"
>3.17
  (GAAS on 2001-02-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.16"
>3.16
  (GAAS on 2001-02-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.15"
>3.15
  (GAAS on 2000-12-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.14"
>3.14
  (GAAS on 2000-12-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.13"
>3.13
  (GAAS on 2000-09-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.12"
>3.12
  (GAAS on 2000-09-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.11"
>3.11
  (GAAS on 2000-08-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.10"
>3.10
  (GAAS on 2000-06-29)</option>
<option
  
  value="GAAS/HTML-Parser-3.09"
>3.09
  (GAAS on 2000-06-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.08"
>3.08
  (GAAS on 2000-05-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.07"
>3.07
  (GAAS on 2000-03-20)</option>
<option
  
  value="GAAS/HTML-Parser-3.06"
>3.06
  (GAAS on 2000-03-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.05"
>3.05
  (GAAS on 2000-01-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.04"
>3.04
  (GAAS on 2000-01-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.02"
>3.02
  (GAAS on 1999-12-21)</option>
<option
  
  value="GAAS/HTML-Parser-3.01"
>3.01
  (GAAS on 1999-12-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.00"
>3.00
  (GAAS on 1999-12-14)</option>
<option
  
  value="GAAS/HTML-Parser-2.24"
>2.24
  (GAAS on 1999-11-03)</option>
<option
  
  value="GAAS/HTML-Parser-2.23"
>2.23
  (GAAS on 1999-06-09)</option>
<option
  
  value="GAAS/HTML-Parser-2.21"
>2.21
  (GAAS on 1998-11-13)</option>
<option
  
  value="GAAS/HTML-Parser-2.20"
>2.20
  (GAAS on 1998-07-08)</option>
<option
  
  value="GAAS/HTML-Parser-2.19"
>2.19
  (GAAS on 1998-07-06)</option>
<option
  
  value="GAAS/HTML-Parser-2.18"
>2.18
  (GAAS on 1998-06-22)</option>
<option
  
  value="GAAS/HTML-Parser-2.17"
>2.17
  (GAAS on 1998-04-28)</option>
<option
  
  value="GAAS/HTML-Parser-2.16"
>2.16
  (GAAS on 1998-04-02)</option>
<option
  
  value="GAAS/HTML-Parser-2.14"
>2.14
  (GAAS on 1998-03-31)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/OALDERS/HTML-Parser-3.81/diff/' + encodeURIComponent(this.value) + '/lib/HTML/Parser.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="OALDERS/HTML-Parser-3.81"
>3.81
  (OALDERS on 2023-01-31)</option>
<option
  
  value="OALDERS/HTML-Parser-3.80"
>3.80
  (OALDERS on 2022-11-01)</option>
<option
  
  value="OALDERS/HTML-Parser-3.79"
>3.79
  (OALDERS on 2022-10-12)</option>
<option
  
  value="OALDERS/HTML-Parser-3.78"
>3.78
  (OALDERS on 2022-03-28)</option>
<option
  
  value="OALDERS/HTML-Parser-3.77"
>3.77
  (OALDERS on 2022-03-14)</option>
<option
  
  value="OALDERS/HTML-Parser-3.76"
>3.76
  (OALDERS on 2021-03-04)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.75"
>3.75
  (CAPOEIRAB on 2020-08-30)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.74"
>3.74
  (CAPOEIRAB on 2020-08-30)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.73"
>3.73
  (CAPOEIRAB on 2020-08-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.72"
>3.72
  (GAAS on 2016-01-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.71"
>3.71
  (GAAS on 2013-05-08)</option>
<option
  
  value="KIMURA/HTML-Parser-3.25-bin-1-Mac"
>3.25-bin-1-Mac
  (KIMURA on 2001-06-12)</option>
<option
  
  value="KIMURA/HTML-Parser-3.23-bin-1-Mac"
>3.23-bin-1-Mac
  (KIMURA on 2001-05-05)</option>
<option
  
  value="KIMURA/HTML-Parser-3.19-bin-1-Mac"
>3.19-bin-1-Mac
  (KIMURA on 2001-03-16)</option>
<option
  
  value="GAAS/HTML-Parser-2.25"
>2.25
  (GAAS on 1999-11-05)</option>
<optgroup label="BackPAN">'
<option
  
  value="GAAS/HTML-Parser-3.70"
>3.70
  (GAAS on 2013-03-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.69"
>3.69
  (GAAS on 2011-10-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.68"
>3.68
  (GAAS on 2010-09-01)</option>
<option
  
  value="GAAS/HTML-Parser-3.67"
>3.67
  (GAAS on 2010-08-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.66"
>3.66
  (GAAS on 2010-07-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.65"
>3.65
  (GAAS on 2010-04-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.64"
>3.64
  (GAAS on 2009-10-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.63"
>3.63
  (GAAS on 2009-10-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.62"
>3.62
  (GAAS on 2009-08-13)</option>
<option
  
  value="GAAS/HTML-Parser-3.61"
>3.61
  (GAAS on 2009-06-20)</option>
<option
  
  value="GAAS/HTML-Parser-3.60"
>3.60
  (GAAS on 2009-02-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.59"
>3.59
  (GAAS on 2008-11-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.58"
>3.58
  (GAAS on 2008-11-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.57"
>3.57
  (GAAS on 2008-11-16)</option>
<option
  
  value="GAAS/HTML-Parser-3.56"
>3.56
  (GAAS on 2007-01-12)</option>
<option
  
  value="GAAS/HTML-Parser-3.55"
>3.55
  (GAAS on 2006-07-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.54"
>3.54
  (GAAS on 2006-04-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.53"
>3.53
  (GAAS on 2006-04-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.52"
>3.52
  (GAAS on 2006-04-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.51"
>3.51
  (GAAS on 2006-03-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.50"
>3.50
  (GAAS on 2006-02-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.49"
>3.49
  (GAAS on 2006-02-08)</option>
<option
  
  value="GAAS/HTML-Parser-3.48"
>3.48
  (GAAS on 2005-12-02)</option>
<option
  
  value="GAAS/HTML-Parser-3.47"
>3.47
  (GAAS on 2005-11-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.46"
>3.46
  (GAAS on 2005-10-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.45"
>3.45
  (GAAS on 2005-01-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.44"
>3.44
  (GAAS on 2004-12-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.43"
>3.43
  (GAAS on 2004-12-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.42"
>3.42
  (GAAS on 2004-12-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.41"
>3.41
  (GAAS on 2004-11-30)</option>
<option
  
  value="GAAS/HTML-Parser-3.40"
>3.40
  (GAAS on 2004-11-29)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_92"
>3.39_92 DEV
  (GAAS on 2004-11-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_91"
>3.39_91 DEV
  (GAAS on 2004-11-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_90"
>3.39_90 DEV
  (GAAS on 2004-11-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.38"
>3.38
  (GAAS on 2004-11-11)</option>
<option
  
  value="GAAS/HTML-Parser-3.37"
>3.37
  (GAAS on 2004-11-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.36"
>3.36
  (GAAS on 2004-04-01)</option>
<option
  
  value="GAAS/HTML-Parser-3.35"
>3.35
  (GAAS on 2003-12-12)</option>
<option
  
  value="GAAS/HTML-Parser-3.34"
>3.34
  (GAAS on 2003-10-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.33"
>3.33
  (GAAS on 2003-10-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.32"
>3.32
  (GAAS on 2003-10-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.31"
>3.31
  (GAAS on 2003-08-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.30"
>3.30
  (GAAS on 2003-08-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.29"
>3.29
  (GAAS on 2003-08-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.28"
>3.28
  (GAAS on 2003-04-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.27"
>3.27
  (GAAS on 2003-01-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.26"
>3.26
  (GAAS on 2002-03-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.25"
>3.25
  (GAAS on 2001-05-11)</option>
<option
  
  value="GAAS/HTML-Parser-3.24"
>3.24
  (GAAS on 2001-05-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.23"
>3.23
  (GAAS on 2001-05-02)</option>
<option
  
  value="GAAS/HTML-Parser-3.22"
>3.22
  (GAAS on 2001-04-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.21"
>3.21
  (GAAS on 2001-04-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.20"
>3.20
  (GAAS on 2001-04-03)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_94"
>3.19_94 DEV
  (GAAS on 2001-03-30)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_93"
>3.19_93 DEV
  (GAAS on 2001-03-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_92"
>3.19_92 DEV
  (GAAS on 2001-03-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_91"
>3.19_91 DEV
  (GAAS on 2001-03-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_90"
>3.19_90 DEV
  (GAAS on 2001-03-13)</option>
<option
  
  value="GAAS/HTML-Parser-3.19"
>3.19
  (GAAS on 2001-03-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.18"
>3.18
  (GAAS on 2001-02-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.17"
>3.17
  (GAAS on 2001-02-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.16"
>3.16
  (GAAS on 2001-02-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.15"
>3.15
  (GAAS on 2000-12-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.14"
>3.14
  (GAAS on 2000-12-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.13"
>3.13
  (GAAS on 2000-09-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.12"
>3.12
  (GAAS on 2000-09-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.11"
>3.11
  (GAAS on 2000-08-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.10"
>3.10
  (GAAS on 2000-06-29)</option>
<option
  
  value="GAAS/HTML-Parser-3.09"
>3.09
  (GAAS on 2000-06-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.08"
>3.08
  (GAAS on 2000-05-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.07"
>3.07
  (GAAS on 2000-03-20)</option>
<option
  
  value="GAAS/HTML-Parser-3.06"
>3.06
  (GAAS on 2000-03-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.05"
>3.05
  (GAAS on 2000-01-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.04"
>3.04
  (GAAS on 2000-01-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.02"
>3.02
  (GAAS on 1999-12-21)</option>
<option
  
  value="GAAS/HTML-Parser-3.01"
>3.01
  (GAAS on 1999-12-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.00"
>3.00
  (GAAS on 1999-12-14)</option>
<option
  
  value="GAAS/HTML-Parser-2.24"
>2.24
  (GAAS on 1999-11-03)</option>
<option
  
  value="GAAS/HTML-Parser-2.23"
>2.23
  (GAAS on 1999-06-09)</option>
<option
  
  value="GAAS/HTML-Parser-2.21"
>2.21
  (GAAS on 1998-11-13)</option>
<option
  
  value="GAAS/HTML-Parser-2.20"
>2.20
  (GAAS on 1998-07-08)</option>
<option
  
  value="GAAS/HTML-Parser-2.19"
>2.19
  (GAAS on 1998-07-06)</option>
<option
  
  value="GAAS/HTML-Parser-2.18"
>2.18
  (GAAS on 1998-06-22)</option>
<option
  
  value="GAAS/HTML-Parser-2.17"
>2.17
  (GAAS on 1998-04-28)</option>
<option
  
  value="GAAS/HTML-Parser-2.16"
>2.16
  (GAAS on 1998-04-02)</option>
<option
  
  value="GAAS/HTML-Parser-2.14"
>2.14
  (GAAS on 1998-03-31)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Carp" title="Carp" class="ellipsis">Carp</a></li>
  <li><a href="https://metacpan.org/pod/Exporter" title="Exporter" class="ellipsis">Exporter</a></li>
  <li><a href="https://metacpan.org/pod/HTML::Tagset" title="HTML::Tagset" class="ellipsis">HTML::Tagset</a></li>
  <li><a href="https://metacpan.org/pod/HTTP::Headers" title="HTTP::Headers" class="ellipsis">HTTP::Headers</a></li>
  <li><a href="https://metacpan.org/pod/IO::File" title="IO::File" class="ellipsis">IO::File</a></li>
  <li><a href="URI.html" title="URI" class="ellipsis">URI</a></li>
  <li><a href="https://metacpan.org/pod/URI::URL" title="URI::URL" class="ellipsis">URI::URL</a></li>
  <li><a href="https://metacpan.org/pod/XSLoader" title="XSLoader" class="ellipsis">XSLoader</a></li>
  <li><a href="https://metacpan.org/pod/strict" title="strict" class="ellipsis">strict</a></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/HTML::Parser/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=HTML%3A%3AParser">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=HTML-Parser">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/OALDERS/HTML-Parser-3.81/view/lib/HTML/Parser.pm">This version</a>
    </li>
    <li>
      <a href="./HTML::Parser.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/HUBAN"><img src="https://www.gravatar.com/avatar/15226a88a183f57fb228aae44dc5c16c?d=identicon&amp;s=20" title="HUBAN" alt="HUBAN"></a>
<a class="display-all" href="https://metacpan.org/author/PERLBOY"><img src="https://www.gravatar.com/avatar/8553a87a00c8d2efcd77fb16e6eb73c9?d=identicon&amp;s=20" title="PERLBOY" alt="PERLBOY"></a>
<a class="display-all" href="https://metacpan.org/author/WREIS"><img src="https://www.gravatar.com/avatar/0b14bc3a0a18e795beebcffef045bbea?d=identicon&amp;s=20" title="WREIS" alt="WREIS"></a>
<a class="display-all" href="https://metacpan.org/author/FANY"><img src="https://www.gravatar.com/avatar/7bc0edaceda1cb0a5b56b844a5b406c2?d=identicon&amp;s=20" title="FANY" alt="FANY"></a>
<a class="display-all" href="https://metacpan.org/author/JMATES"><img src="https://www.gravatar.com/avatar/06accb84e6519284be3941ff72e429cb?d=identicon&amp;s=20" title="JMATES" alt="JMATES"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/HTML-Parser/plussers">22 PAUSE users</a>
</div>
<div>
    25 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 24 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-cpan-author="GAAS"
      data-contrib-email="gaas@cpan.org gisle@aas.no"
    >
      <a href="https://metacpan.org/author/GAAS" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/80ccd89a65d9faf08c2fb6be2991ba57?d=identicon&amp;s=20" />
      Gisle Aas
      </a>
    </li>
    <li class="contributor"
      data-contrib-email="antonio@dyne.org"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Antonio Radici
    </li>
    <li class="contributor"
      data-cpan-author="BARBIE"
      data-contrib-email="barbie@missbarbell.co.uk"
    >
      <a href="https://metacpan.org/author/BARBIE" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/92c6c2f8be6f62c74aae398b99aefe57?d=identicon&amp;s=20" />
      Barbie
      </a>
    </li>
    <li class="contributor"
      data-contrib-email="bulk88@hotmail.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      bulk88
    </li>
    <li class="contributor"
      data-cpan-author="CAPOEIRAB"
      data-contrib-email="capoeirab@cpan.org"
    >
      <a href="https://metacpan.org/author/CAPOEIRAB" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/912bfa255ef8161a494932af0cad48c5?d=identicon&amp;s=20" />
      Chase Whitener
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="CHIPS"
      data-contrib-email="chip@pobox.com"
    >
      <a href="https://metacpan.org/author/CHIPS" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/60cdb5a6d95805ffc42a674bb504bbb1?d=identicon&amp;s=20" />
      Chip Salzenberg
      </a>
    </li>
    <li class="contributor"
      data-contrib-email="dmn@debian.org"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Damyan Ivanov
    </li>
    <li class="contributor"
      data-contrib-email="dsteinbrunner@pobox.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      David Steinbrunner
    </li>
    <li class="contributor"
      data-cpan-author="PERRAD"
      data-contrib-email="francois.perrad@gadz.org"
    >
      <a href="https://metacpan.org/author/PERRAD" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/4219d7ad0c9c2be2b9f3abfd68a94dd4?d=identicon&amp;s=20" />
      François Perrad
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="HAARG"
      data-contrib-email="haarg@haarg.org"
    >
      <a href="https://metacpan.org/author/HAARG" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/5037faf9ba40cf736778820fe83fc2ae?d=identicon&amp;s=20" />
      Graham Knop
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="JACQUESG"
      data-contrib-email="jacquesg@striata.com"
    >
      <a href="https://metacpan.org/author/JACQUESG" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/979fdf21a0f82c302536905d762adf75?d=identicon&amp;s=20" />
      Jacques Germishuys
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="RAZ"
      data-contrib-email="jraspass@gmail.com"
    >
      <a href="https://metacpan.org/author/RAZ" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/b9af2a54454e8f38c169be0c236670d6?d=identicon&amp;s=20" />
      James Raspass
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="JROBINSON"
      data-contrib-email="castaway@desert-island.me.uk"
    >
      <a href="https://metacpan.org/author/JROBINSON" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/c7254b939e5a5f293d8fabb51167fbaa?d=identicon&amp;s=20" />
      Jess Robinson
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="JONJ"
      data-contrib-email="jon@endpoint.com"
    >
      <a href="https://metacpan.org/author/JONJ" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/6becea182c4c0326e48ac2d3fc056b11?d=identicon&amp;s=20" />
      Jon Jensen
      </a>
    </li>
    <li class="contributor"
      data-contrib-email="mspacek@redhat.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Michal Josef Špaček
    </li>
    <li class="contributor"
      data-cpan-author="MSOUTH"
      data-contrib-email="msouth@gmail.com"
    >
      <a href="https://metacpan.org/author/MSOUTH" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/db7b941f3e749b0365533e72d02db30f?d=identicon&amp;s=20" />
      Mike South
      </a>
    </li>
    <li class="contributor"
      data-contrib-email="nick@ccl4.org"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Nicholas Clark
    </li>
    <li class="contributor"
      data-contrib-email="nicolas@atoomic.org"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Nicolas R
    </li>
    <li class="contributor"
      data-contrib-email="olaf@wundersolutions.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Olaf Alders
    </li>
    <li class="contributor"
      data-contrib-email="salvatore.bonaccorso@gmail.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Salvatore Bonaccorso
    </li>
    <li class="contributor"
      data-cpan-author="TODDR"
      data-contrib-email="toddr@cpan.org"
    >
      <a href="https://metacpan.org/author/TODDR" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/593351ab4ba45a73fb5de512d89432d2?d=identicon&amp;s=20" />
      Todd Rinaldo
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="SCOP"
      data-contrib-email="ville.skytta@iki.fi"
    >
      <a href="https://metacpan.org/author/SCOP" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/4623589f12ed201b060c2075fd9c0920?d=identicon&amp;s=20" />
      Ville Skyttä
      </a>
    </li>
    <li class="contributor"
      data-contrib-email="demerphq@gmail.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Yves Orton
    </li>
    <li class="contributor"
      data-cpan-author="ZEFRAM"
      data-contrib-email="zefram@fysh.org"
    >
      <a href="https://metacpan.org/author/ZEFRAM" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/aab343bc3a4424dcb7f913920242f051?d=identicon&amp;s=20" />
      Zefram
      </a>
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/OALDERS" class="author-name">Olaf Alders 🐫</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/HTML/Parser.pm&#39;" class="">
<option
  selected
  value="OALDERS/HTML-Parser-3.81"
>3.81
  (OALDERS on 2023-01-31)</option>
<option
  
  value="OALDERS/HTML-Parser-3.80"
>3.80
  (OALDERS on 2022-11-01)</option>
<option
  
  value="OALDERS/HTML-Parser-3.79"
>3.79
  (OALDERS on 2022-10-12)</option>
<option
  
  value="OALDERS/HTML-Parser-3.78"
>3.78
  (OALDERS on 2022-03-28)</option>
<option
  
  value="OALDERS/HTML-Parser-3.77"
>3.77
  (OALDERS on 2022-03-14)</option>
<option
  
  value="OALDERS/HTML-Parser-3.76"
>3.76
  (OALDERS on 2021-03-04)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.75"
>3.75
  (CAPOEIRAB on 2020-08-30)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.74"
>3.74
  (CAPOEIRAB on 2020-08-30)</option>
<option
  
  value="CAPOEIRAB/HTML-Parser-3.73"
>3.73
  (CAPOEIRAB on 2020-08-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.72"
>3.72
  (GAAS on 2016-01-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.71"
>3.71
  (GAAS on 2013-05-08)</option>
<option
  
  value="KIMURA/HTML-Parser-3.25-bin-1-Mac"
>3.25-bin-1-Mac
  (KIMURA on 2001-06-12)</option>
<option
  
  value="KIMURA/HTML-Parser-3.23-bin-1-Mac"
>3.23-bin-1-Mac
  (KIMURA on 2001-05-05)</option>
<option
  
  value="KIMURA/HTML-Parser-3.19-bin-1-Mac"
>3.19-bin-1-Mac
  (KIMURA on 2001-03-16)</option>
<option
  
  value="GAAS/HTML-Parser-2.25"
>2.25
  (GAAS on 1999-11-05)</option>
<optgroup label="BackPAN">'
<option
  
  value="GAAS/HTML-Parser-3.70"
>3.70
  (GAAS on 2013-03-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.69"
>3.69
  (GAAS on 2011-10-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.68"
>3.68
  (GAAS on 2010-09-01)</option>
<option
  
  value="GAAS/HTML-Parser-3.67"
>3.67
  (GAAS on 2010-08-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.66"
>3.66
  (GAAS on 2010-07-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.65"
>3.65
  (GAAS on 2010-04-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.64"
>3.64
  (GAAS on 2009-10-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.63"
>3.63
  (GAAS on 2009-10-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.62"
>3.62
  (GAAS on 2009-08-13)</option>
<option
  
  value="GAAS/HTML-Parser-3.61"
>3.61
  (GAAS on 2009-06-20)</option>
<option
  
  value="GAAS/HTML-Parser-3.60"
>3.60
  (GAAS on 2009-02-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.59"
>3.59
  (GAAS on 2008-11-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.58"
>3.58
  (GAAS on 2008-11-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.57"
>3.57
  (GAAS on 2008-11-16)</option>
<option
  
  value="GAAS/HTML-Parser-3.56"
>3.56
  (GAAS on 2007-01-12)</option>
<option
  
  value="GAAS/HTML-Parser-3.55"
>3.55
  (GAAS on 2006-07-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.54"
>3.54
  (GAAS on 2006-04-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.53"
>3.53
  (GAAS on 2006-04-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.52"
>3.52
  (GAAS on 2006-04-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.51"
>3.51
  (GAAS on 2006-03-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.50"
>3.50
  (GAAS on 2006-02-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.49"
>3.49
  (GAAS on 2006-02-08)</option>
<option
  
  value="GAAS/HTML-Parser-3.48"
>3.48
  (GAAS on 2005-12-02)</option>
<option
  
  value="GAAS/HTML-Parser-3.47"
>3.47
  (GAAS on 2005-11-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.46"
>3.46
  (GAAS on 2005-10-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.45"
>3.45
  (GAAS on 2005-01-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.44"
>3.44
  (GAAS on 2004-12-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.43"
>3.43
  (GAAS on 2004-12-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.42"
>3.42
  (GAAS on 2004-12-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.41"
>3.41
  (GAAS on 2004-11-30)</option>
<option
  
  value="GAAS/HTML-Parser-3.40"
>3.40
  (GAAS on 2004-11-29)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_92"
>3.39_92 DEV
  (GAAS on 2004-11-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_91"
>3.39_91 DEV
  (GAAS on 2004-11-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.39_90"
>3.39_90 DEV
  (GAAS on 2004-11-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.38"
>3.38
  (GAAS on 2004-11-11)</option>
<option
  
  value="GAAS/HTML-Parser-3.37"
>3.37
  (GAAS on 2004-11-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.36"
>3.36
  (GAAS on 2004-04-01)</option>
<option
  
  value="GAAS/HTML-Parser-3.35"
>3.35
  (GAAS on 2003-12-12)</option>
<option
  
  value="GAAS/HTML-Parser-3.34"
>3.34
  (GAAS on 2003-10-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.33"
>3.33
  (GAAS on 2003-10-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.32"
>3.32
  (GAAS on 2003-10-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.31"
>3.31
  (GAAS on 2003-08-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.30"
>3.30
  (GAAS on 2003-08-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.29"
>3.29
  (GAAS on 2003-08-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.28"
>3.28
  (GAAS on 2003-04-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.27"
>3.27
  (GAAS on 2003-01-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.26"
>3.26
  (GAAS on 2002-03-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.25"
>3.25
  (GAAS on 2001-05-11)</option>
<option
  
  value="GAAS/HTML-Parser-3.24"
>3.24
  (GAAS on 2001-05-09)</option>
<option
  
  value="GAAS/HTML-Parser-3.23"
>3.23
  (GAAS on 2001-05-02)</option>
<option
  
  value="GAAS/HTML-Parser-3.22"
>3.22
  (GAAS on 2001-04-18)</option>
<option
  
  value="GAAS/HTML-Parser-3.21"
>3.21
  (GAAS on 2001-04-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.20"
>3.20
  (GAAS on 2001-04-03)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_94"
>3.19_94 DEV
  (GAAS on 2001-03-30)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_93"
>3.19_93 DEV
  (GAAS on 2001-03-27)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_92"
>3.19_92 DEV
  (GAAS on 2001-03-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_91"
>3.19_91 DEV
  (GAAS on 2001-03-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.19_90"
>3.19_90 DEV
  (GAAS on 2001-03-13)</option>
<option
  
  value="GAAS/HTML-Parser-3.19"
>3.19
  (GAAS on 2001-03-10)</option>
<option
  
  value="GAAS/HTML-Parser-3.18"
>3.18
  (GAAS on 2001-02-25)</option>
<option
  
  value="GAAS/HTML-Parser-3.17"
>3.17
  (GAAS on 2001-02-24)</option>
<option
  
  value="GAAS/HTML-Parser-3.16"
>3.16
  (GAAS on 2001-02-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.15"
>3.15
  (GAAS on 2000-12-26)</option>
<option
  
  value="GAAS/HTML-Parser-3.14"
>3.14
  (GAAS on 2000-12-04)</option>
<option
  
  value="GAAS/HTML-Parser-3.13"
>3.13
  (GAAS on 2000-09-17)</option>
<option
  
  value="GAAS/HTML-Parser-3.12"
>3.12
  (GAAS on 2000-09-14)</option>
<option
  
  value="GAAS/HTML-Parser-3.11"
>3.11
  (GAAS on 2000-08-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.10"
>3.10
  (GAAS on 2000-06-29)</option>
<option
  
  value="GAAS/HTML-Parser-3.09"
>3.09
  (GAAS on 2000-06-28)</option>
<option
  
  value="GAAS/HTML-Parser-3.08"
>3.08
  (GAAS on 2000-05-23)</option>
<option
  
  value="GAAS/HTML-Parser-3.07"
>3.07
  (GAAS on 2000-03-20)</option>
<option
  
  value="GAAS/HTML-Parser-3.06"
>3.06
  (GAAS on 2000-03-06)</option>
<option
  
  value="GAAS/HTML-Parser-3.05"
>3.05
  (GAAS on 2000-01-22)</option>
<option
  
  value="GAAS/HTML-Parser-3.04"
>3.04
  (GAAS on 2000-01-15)</option>
<option
  
  value="GAAS/HTML-Parser-3.02"
>3.02
  (GAAS on 1999-12-21)</option>
<option
  
  value="GAAS/HTML-Parser-3.01"
>3.01
  (GAAS on 1999-12-19)</option>
<option
  
  value="GAAS/HTML-Parser-3.00"
>3.00
  (GAAS on 1999-12-14)</option>
<option
  
  value="GAAS/HTML-Parser-2.24"
>2.24
  (GAAS on 1999-11-03)</option>
<option
  
  value="GAAS/HTML-Parser-2.23"
>2.23
  (GAAS on 1999-06-09)</option>
<option
  
  value="GAAS/HTML-Parser-2.21"
>2.21
  (GAAS on 1998-11-13)</option>
<option
  
  value="GAAS/HTML-Parser-2.20"
>2.20
  (GAAS on 1998-07-08)</option>
<option
  
  value="GAAS/HTML-Parser-2.19"
>2.19
  (GAAS on 1998-07-06)</option>
<option
  
  value="GAAS/HTML-Parser-2.18"
>2.18
  (GAAS on 1998-06-22)</option>
<option
  
  value="GAAS/HTML-Parser-2.17"
>2.17
  (GAAS on 1998-04-28)</option>
<option
  
  value="GAAS/HTML-Parser-2.16"
>2.16
  (GAAS on 1998-04-02)</option>
<option
  
  value="GAAS/HTML-Parser-2.14"
>2.14
  (GAAS on 1998-03-31)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/HTML-Parser">HTML-Parser-3.81</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage four &#10;
          • 548 direct dependents &#10;          • 3510 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="HTML-Parser-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="HTML-Parser-3.81">
    <input type="hidden" name="author" value="OALDERS">
    <input type="hidden" name="distribution" value="HTML-Parser">
    <button type="submit" class="favorite highlight"><span>47</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./HTML::Parser.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>47</span> ++</a>
</div>
   / <span>HTML::Parser</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./HTML::Parser.html#NAME">NAME</a></li>
  <li><a href="./HTML::Parser.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./HTML::Parser.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./HTML::Parser.html#METHODS">METHODS</a>
    <ul>
      <li><a href="./HTML::Parser.html#Argspec">Argspec</a></li>
      <li><a href="./HTML::Parser.html#Events">Events</a></li>
      <li><a href="./HTML::Parser.html#Unicode">Unicode</a></li>
    </ul>
  </li>
  <li><a href="./HTML::Parser.html#VERSION-2-COMPATIBILITY">VERSION 2 COMPATIBILITY</a></li>
  <li><a href="./HTML::Parser.html#SUBCLASSING">SUBCLASSING</a></li>
  <li><a href="./HTML::Parser.html#EXAMPLES">EXAMPLES</a></li>
  <li><a href="./HTML::Parser.html#BUGS">BUGS</a></li>
  <li><a href="./HTML::Parser.html#DIAGNOSTICS">DIAGNOSTICS</a></li>
  <li><a href="./HTML::Parser.html#SEE-ALSO">SEE ALSO</a></li>
  <li><a href="./HTML::Parser.html#COPYRIGHT">COPYRIGHT</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>HTML::Parser - HTML parser class</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>    use strict;
    use warnings;
    use HTML::Parser ();

    # Create parser object
    my $p = HTML::Parser-&gt;new(
        api_version     =&gt; 3,
        start_h         =&gt; [\&amp;start, &quot;tagname, attr&quot;],
        end_h           =&gt; [\&amp;end,   &quot;tagname&quot;],
        marked_sections =&gt; 1,
    );

    # Parse document text chunk by chunk
    $p-&gt;parse($chunk1);
    $p-&gt;parse($chunk2);

    # ...
    # signal end of document
    $p-&gt;eof;

    # Parse directly from file
    $p-&gt;parse_file(&quot;foo.html&quot;);

    # or
    open(my $fh, &quot;&lt;:utf8&quot;, &quot;foo.html&quot;) || die;
    $p-&gt;parse_file($fh);</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>Objects of the <code>HTML::Parser</code> class will recognize markup and separate it from plain text (alias data content) in HTML documents. As different kinds of markup and text are recognized, the corresponding event handlers are invoked.</p>

<p><code>HTML::Parser</code> is not a generic SGML parser. We have tried to make it able to deal with the HTML that is actually &quot;out there&quot;, and it normally parses as closely as possible to the way the popular web browsers do it instead of strictly following one of the many HTML specifications from W3C. Where there is disagreement, there is often an option that you can enable to get the official behaviour.</p>

<p>The document to be parsed may be supplied in arbitrary chunks. This makes on-the-fly parsing as documents are received from the network possible.</p>

<p>If event driven parsing does not feel right for your application, you might want to use <code>HTML::PullParser</code>. This is an <code>HTML::Parser</code> subclass that allows a more conventional program structure.</p>

<h1 id="METHODS">METHODS</h1>

<p>The following method is used to construct a new <code>HTML::Parser</code> object:</p>

<dl>

<dt id="$p-=-HTML::Parser-&gt;new(-%options_and_handlers-)"><a id="p---HTML::Parser--new---options_and_handlers"></a>$p = HTML::Parser-&gt;new( %options_and_handlers )</dt>
<dd>

<p>This class method creates a new <code>HTML::Parser</code> object and returns it. Key/value argument pairs may be provided to assign event handlers or initialize parser options. The handlers and parser options can also be set or modified later by the method calls described below.</p>

<p>If a top level key is in the form &quot;&lt;event&gt;_h&quot; (e.g., &quot;text_h&quot;) then it assigns a handler to that event, otherwise it initializes a parser option. The event handler specification value must be an array reference. Multiple handlers may also be assigned with the &#39;handlers =&gt; [%handlers]&#39; option. See examples below.</p>

<p>If new() is called without any arguments, it will create a parser that uses callback methods compatible with version 2 of <code>HTML::Parser</code>. See the section on &quot;version 2 compatibility&quot; below for details.</p>

<p>The special constructor option &#39;api_version =&gt; 2&#39; can be used to initialize version 2 callbacks while still setting other options and handlers. The &#39;api_version =&gt; 3&#39; option can be used if you don&#39;t want to set any options and don&#39;t want to fall back to v2 compatible mode.</p>

<p>Examples:</p>

<pre><code> $p = HTML::Parser-&gt;new(
   api_version =&gt; 3,
   text_h =&gt; [ sub {...}, &quot;dtext&quot; ]
 );</code></pre>

<p>This creates a new parser object with a text event handler subroutine that receives the original text with general entities decoded.</p>

<pre><code> $p = HTML::Parser-&gt;new(
   api_version =&gt; 3,
   start_h =&gt; [ &#39;my_start&#39;, &quot;self,tokens&quot; ]
 );</code></pre>

<p>This creates a new parser object with a start event handler method that receives the $p and the tokens array.</p>

<pre><code> $p = HTML::Parser-&gt;new(
   api_version =&gt; 3,
   handlers =&gt; {
     text =&gt; [\@array, &quot;event,text&quot;],
     comment =&gt; [\@array, &quot;event,text&quot;],
   }
 );</code></pre>

<p>This creates a new parser object that stores the event type and the original text in @array for text and comment events.</p>

</dd>
</dl>

<p>The following methods feed the HTML document to the <code>HTML::Parser</code> object:</p>

<dl>

<dt id="$p-&gt;parse(-$string-)"><a id="p--parse---string"></a>$p-&gt;parse( $string )</dt>
<dd>

<p>Parse $string as the next chunk of the HTML document. Handlers invoked should not attempt to modify the $string in-place until $p-&gt;parse returns.</p>

<p>If an invoked event handler aborts parsing by calling $p-&gt;eof, then $p-&gt;parse() will return a FALSE value. Otherwise the return value is a reference to the parser object ($p).</p>

</dd>
<dt id="$p-&gt;parse(-$code_ref-)"><a id="p--parse---code_ref"></a>$p-&gt;parse( $code_ref )</dt>
<dd>

<p>If a code reference is passed as the argument to be parsed, then the chunks to be parsed are obtained by invoking this function repeatedly. Parsing continues until the function returns an empty (or undefined) result. When this happens $p-&gt;eof is automatically signaled.</p>

<p>Parsing will also abort if one of the event handlers calls $p-&gt;eof.</p>

<p>The effect of this is the same as:</p>

<pre><code>    while (1) {
        my $chunk = &amp;$code_ref();
        if (!defined($chunk) || !length($chunk)) {
            $p-&gt;eof;
            return $p;
        }
        $p-&gt;parse($chunk) || return undef;
    }</code></pre>

<p>But it is more efficient as this loop runs internally in XS code.</p>

</dd>
<dt id="$p-&gt;parse_file(-$file-)"><a id="p--parse_file---file"></a>$p-&gt;parse_file( $file )</dt>
<dd>

<p>Parse text directly from a file. The $file argument can be a filename, an open file handle, or a reference to an open file handle.</p>

<p>If $file contains a filename and the file can&#39;t be opened, then the method returns an undefined value and $! tells why it failed. Otherwise the return value is a reference to the parser object.</p>

<p>If a file handle is passed as the $file argument, then the file will normally be read until EOF, but not closed.</p>

<p>If an invoked event handler aborts parsing by calling $p-&gt;eof, then $p-&gt;parse_file() may not have read the entire file.</p>

<p>On systems with multi-byte line terminators, the values passed for the offset and length argspecs may be too low if parse_file() is called on a file handle that is not in binary mode.</p>

<p>If a filename is passed in, then parse_file() will open the file in binary mode.</p>

</dd>
<dt id="$p-&gt;eof"><a id="p--eof"></a>$p-&gt;eof</dt>
<dd>

<p>Signals the end of the HTML document. Calling the $p-&gt;eof method outside a handler callback will flush any remaining buffered text (which triggers the <code>text</code> event if there is any remaining text).</p>

<p>Calling $p-&gt;eof inside a handler will terminate parsing at that point and cause $p-&gt;parse to return a FALSE value. This also terminates parsing by $p-&gt;parse_file().</p>

<p>After $p-&gt;eof has been called, the parse() and parse_file() methods can be invoked to feed new documents with the parser object.</p>

<p>The return value from eof() is a reference to the parser object.</p>

</dd>
</dl>

<p>Most parser options are controlled by boolean attributes. Each boolean attribute is enabled by calling the corresponding method with a TRUE argument and disabled with a FALSE argument. The attribute value is left unchanged if no argument is given. The return value from each method is the old attribute value.</p>

<p>Methods that can be used to get and/or set parser options are:</p>

<dl>

<dt id="$p-&gt;attr_encoded"><a id="p--attr_encoded"></a>$p-&gt;attr_encoded</dt>
<dd>

</dd>
<dt id="$p-&gt;attr_encoded(-$bool-)"><a id="p--attr_encoded---bool"></a>$p-&gt;attr_encoded( $bool )</dt>
<dd>

<p>By default, the <code>attr</code> and <code>@attr</code> argspecs will have general entities for attribute values decoded. Enabling this attribute leaves entities alone.</p>

</dd>
<dt id="$p-&gt;backquote"><a id="p--backquote"></a>$p-&gt;backquote</dt>
<dd>

</dd>
<dt id="$p-&gt;backquote(-$bool-)"><a id="p--backquote---bool"></a>$p-&gt;backquote( $bool )</dt>
<dd>

<p>By default, only &#39; and &quot; are recognized as quote characters around attribute values. MSIE also recognizes backquotes for some reason. Enabling this attribute provides compatibility with this behaviour.</p>

</dd>
<dt id="$p-&gt;boolean_attribute_value(-$val-)"><a id="p--boolean_attribute_value---val"></a>$p-&gt;boolean_attribute_value( $val )</dt>
<dd>

<p>This method sets the value reported for boolean attributes inside HTML start tags. By default, the name of the attribute is also used as its value. This affects the values reported for <code>tokens</code> and <code>attr</code> argspecs.</p>

</dd>
<dt id="$p-&gt;case_sensitive"><a id="p--case_sensitive"></a>$p-&gt;case_sensitive</dt>
<dd>

</dd>
<dt id="$p-&gt;case_sensitive(-$bool-)"><a id="p--case_sensitive---bool"></a>$p-&gt;case_sensitive( $bool )</dt>
<dd>

<p>By default, tag names and attribute names are down-cased. Enabling this attribute leaves them as found in the HTML source document.</p>

</dd>
<dt id="$p-&gt;closing_plaintext"><a id="p--closing_plaintext"></a>$p-&gt;closing_plaintext</dt>
<dd>

</dd>
<dt id="$p-&gt;closing_plaintext(-$bool-)"><a id="p--closing_plaintext---bool"></a>$p-&gt;closing_plaintext( $bool )</dt>
<dd>

<p>By default, <code>plaintext</code> element can never be closed. Everything up to the end of the document is parsed in CDATA mode. This historical behaviour is what at least MSIE does. Enabling this attribute makes closing <code> &lt;/plaintext</code> &gt; tag effective and the parsing process will resume after seeing this tag. This emulates early gecko-based browsers.</p>

</dd>
<dt id="$p-&gt;empty_element_tags"><a id="p--empty_element_tags"></a>$p-&gt;empty_element_tags</dt>
<dd>

</dd>
<dt id="$p-&gt;empty_element_tags(-$bool-)"><a id="p--empty_element_tags---bool"></a>$p-&gt;empty_element_tags( $bool )</dt>
<dd>

<p>By default, empty element tags are not recognized as such and the &quot;/&quot; before &quot;&gt;&quot; is just treated like a normal name character (unless <code>strict_names</code> is enabled). Enabling this attribute make <code>HTML::Parser</code> recognize these tags.</p>

<p>Empty element tags look like start tags, but end with the character sequence &quot;/&gt;&quot; instead of &quot;&gt;&quot;. When recognized by <code>HTML::Parser</code> they cause an artificial end event in addition to the start event. The <code>text</code> for the artificial end event will be empty and the <code>tokenpos</code> array will be undefined even though the token array will have one element containing the tag name.</p>

</dd>
<dt id="$p-&gt;marked_sections"><a id="p--marked_sections"></a>$p-&gt;marked_sections</dt>
<dd>

</dd>
<dt id="$p-&gt;marked_sections(-$bool-)"><a id="p--marked_sections---bool"></a>$p-&gt;marked_sections( $bool )</dt>
<dd>

<p>By default, section markings like &lt;![CDATA[...]]&gt; are treated like ordinary text. When this attribute is enabled section markings are honoured.</p>

<p>There are currently no events associated with the marked section markup, but the text can be returned as <code>skipped_text</code>.</p>

</dd>
<dt id="$p-&gt;strict_comment"><a id="p--strict_comment"></a>$p-&gt;strict_comment</dt>
<dd>

</dd>
<dt id="$p-&gt;strict_comment(-$bool-)"><a id="p--strict_comment---bool"></a>$p-&gt;strict_comment( $bool )</dt>
<dd>

<p>By default, comments are terminated by the first occurrence of &quot;--&gt;&quot;. This is the behaviour of most popular browsers (like Mozilla, Opera and MSIE), but it is not correct according to the official HTML standard. Officially, you need an even number of &quot;--&quot; tokens before the closing &quot;&gt;&quot; is recognized and there may not be anything but whitespace between an even and an odd &quot;--&quot;.</p>

<p>The official behaviour is enabled by enabling this attribute.</p>

<p>Enabling of &#39;strict_comment&#39; also disables recognizing these forms as comments:</p>

<pre><code>  &lt;/ comment&gt;
  &lt;! comment&gt;</code></pre>

</dd>
<dt id="$p-&gt;strict_end"><a id="p--strict_end"></a>$p-&gt;strict_end</dt>
<dd>

</dd>
<dt id="$p-&gt;strict_end(-$bool-)"><a id="p--strict_end---bool"></a>$p-&gt;strict_end( $bool )</dt>
<dd>

<p>By default, attributes and other junk are allowed to be present on end tags in a manner that emulates MSIE&#39;s behaviour.</p>

<p>The official behaviour is enabled with this attribute. If enabled, only whitespace is allowed between the tagname and the final &quot;&gt;&quot;.</p>

</dd>
<dt id="$p-&gt;strict_names"><a id="p--strict_names"></a>$p-&gt;strict_names</dt>
<dd>

</dd>
<dt id="$p-&gt;strict_names(-$bool-)"><a id="p--strict_names---bool"></a>$p-&gt;strict_names( $bool )</dt>
<dd>

<p>By default, almost anything is allowed in tag and attribute names. This is the behaviour of most popular browsers and allows us to parse some broken tags with invalid attribute values like:</p>

<pre><code>   &lt;IMG SRC=newprevlstGr.gif ALT=[PREV LIST] BORDER=0&gt;</code></pre>

<p>By default, &quot;LIST]&quot; is parsed as a boolean attribute, not as part of the ALT value as was clearly intended. This is also what Mozilla sees.</p>

<p>The official behaviour is enabled by enabling this attribute. If enabled, it will cause the tag above to be reported as text since &quot;LIST]&quot; is not a legal attribute name.</p>

</dd>
<dt id="$p-&gt;unbroken_text"><a id="p--unbroken_text"></a>$p-&gt;unbroken_text</dt>
<dd>

</dd>
<dt id="$p-&gt;unbroken_text(-$bool-)"><a id="p--unbroken_text---bool"></a>$p-&gt;unbroken_text( $bool )</dt>
<dd>

<p>By default, blocks of text are given to the text handler as soon as possible (but the parser takes care always to break text at a boundary between whitespace and non-whitespace so single words and entities can always be decoded safely). This might create breaks that make it hard to do transformations on the text. When this attribute is enabled, blocks of text are always reported in one piece. This will delay the text event until the following (non-text) event has been recognized by the parser.</p>

<p>Note that the <code>offset</code> argspec will give you the offset of the first segment of text and <code>length</code> is the combined length of the segments. Since there might be ignored tags in between, these numbers can&#39;t be used to directly index in the original document file.</p>

</dd>
<dt id="$p-&gt;utf8_mode"><a id="p--utf8_mode"></a>$p-&gt;utf8_mode</dt>
<dd>

</dd>
<dt id="$p-&gt;utf8_mode(-$bool-)"><a id="p--utf8_mode---bool"></a>$p-&gt;utf8_mode( $bool )</dt>
<dd>

<p>Enable this option when parsing raw undecoded UTF-8. This tells the parser that the entities expanded for strings reported by <code>attr</code>, <code>@attr</code> and <code>dtext</code> should be expanded as decoded UTF-8 so they end up compatible with the surrounding text.</p>

<p>If <code>utf8_mode</code> is enabled then it is an error to pass strings containing characters with code above 255 to the parse() method, and the parse() method will croak if you try.</p>

<p>Example: The Unicode character &quot;\x{2665}&quot; is &quot;\xE2\x99\xA5&quot; when UTF-8 encoded. The character can also be represented by the entity &quot;&amp;hearts;&quot; or &quot;&amp;#x2665&quot;. If we feed the parser:</p>

<pre><code>  $p-&gt;parse(&quot;\xE2\x99\xA5&amp;hearts;&quot;);</code></pre>

<p>then <code>dtext</code> will be reported as &quot;\xE2\x99\xA5\x{2665}&quot; without <code>utf8_mode</code> enabled, but as &quot;\xE2\x99\xA5\xE2\x99\xA5&quot; when enabled. The later string is what you want.</p>

<p>This option is only available with perl-5.8 or better.</p>

</dd>
<dt id="$p-&gt;xml_mode"><a id="p--xml_mode"></a>$p-&gt;xml_mode</dt>
<dd>

</dd>
<dt id="$p-&gt;xml_mode(-$bool-)"><a id="p--xml_mode---bool"></a>$p-&gt;xml_mode( $bool )</dt>
<dd>

<p>Enabling this attribute changes the parser to allow some XML constructs. This enables the behaviour controlled by individually by the <code>case_sensitive</code>, <code>empty_element_tags</code>, <code>strict_names</code> and <code>xml_pic</code> attributes and also suppresses special treatment of elements that are parsed as CDATA for HTML.</p>

</dd>
<dt id="$p-&gt;xml_pic"><a id="p--xml_pic"></a>$p-&gt;xml_pic</dt>
<dd>

</dd>
<dt id="$p-&gt;xml_pic(-$bool-)"><a id="p--xml_pic---bool"></a>$p-&gt;xml_pic( $bool )</dt>
<dd>

<p>By default, <i>processing instructions</i> are terminated by &quot;&gt;&quot;. When this attribute is enabled, processing instructions are terminated by &quot;?&gt;&quot; instead.</p>

</dd>
</dl>

<p>As markup and text is recognized, handlers are invoked. The following method is used to set up handlers for different events:</p>

<dl>

<dt id="$p-&gt;handler(-event-=&gt;-\&amp;subroutine,-$argspec-)"><a id="p--handler--event----subroutine---argspec"></a>$p-&gt;handler( event =&gt; \&amp;subroutine, $argspec )</dt>
<dd>

</dd>
<dt id="$p-&gt;handler(-event-=&gt;-$method_name,-$argspec-)"><a id="p--handler--event----method_name---argspec"></a>$p-&gt;handler( event =&gt; $method_name, $argspec )</dt>
<dd>

</dd>
<dt id="$p-&gt;handler(-event-=&gt;-\@accum,-$argspec-)"><a id="p--handler--event----accum---argspec"></a>$p-&gt;handler( event =&gt; \@accum, $argspec )</dt>
<dd>

</dd>
<dt id="$p-&gt;handler(-event-=&gt;-&quot;&quot;-);"><a id="p--handler--event"></a>$p-&gt;handler( event =&gt; &quot;&quot; );</dt>
<dd>

</dd>
<dt id="$p-&gt;handler(-event-=&gt;-undef-);"><a id="p--handler--event---undef"></a>$p-&gt;handler( event =&gt; undef );</dt>
<dd>

</dd>
<dt id="$p-&gt;handler(-event-);"><a id="p--handler--event1"></a>$p-&gt;handler( event );</dt>
<dd>

<p>This method assigns a subroutine, method, or array to handle an event.</p>

<p>Event is one of <code>text</code>, <code>start</code>, <code>end</code>, <code>declaration</code>, <code>comment</code>, <code>process</code>, <code>start_document</code>, <code>end_document</code> or <code>default</code>.</p>

<p>The <code>\&amp;subroutine</code> is a reference to a subroutine which is called to handle the event.</p>

<p>The <code>$method_name</code> is the name of a method of $p which is called to handle the event.</p>

<p>The <code>@accum</code> is an array that will hold the event information as sub-arrays.</p>

<p>If the second argument is &quot;&quot;, the event is ignored. If it is undef, the default handler is invoked for the event.</p>

<p>The <code>$argspec</code> is a string that describes the information to be reported for the event. Any requested information that does not apply to a specific event is passed as <code>undef</code>. If argspec is omitted, then it is left unchanged.</p>

<p>The return value from $p-&gt;handler is the old callback routine or a reference to the accumulator array.</p>

<p>Any return values from handler callback routines/methods are always ignored. A handler callback can request parsing to be aborted by invoking the $p-&gt;eof method. A handler callback is not allowed to invoke the $p-&gt;parse() or $p-&gt;parse_file() method. An exception will be raised if it tries.</p>

<p>Examples:</p>

<pre><code>    $p-&gt;handler(start =&gt;  &quot;start&quot;, &#39;self, attr, attrseq, text&#39; );</code></pre>

<p>This causes the &quot;start&quot; method of object <code>$p</code> to be called for &#39;start&#39; events. The callback signature is <code>$p-&gt;start(\%attr, \@attr_seq, $text)</code>.</p>

<pre><code>    $p-&gt;handler(start =&gt;  \&amp;start, &#39;attr, attrseq, text&#39; );</code></pre>

<p>This causes subroutine start() to be called for &#39;start&#39; events. The callback signature is start(\%attr, \@attr_seq, $text).</p>

<pre><code>    $p-&gt;handler(start =&gt;  \@accum, &#39;&quot;S&quot;, attr, attrseq, text&#39; );</code></pre>

<p>This causes &#39;start&#39; event information to be saved in @accum. The array elements will be [&#39;S&#39;, \%attr, \@attr_seq, $text].</p>

<pre><code>   $p-&gt;handler(start =&gt; &quot;&quot;);</code></pre>

<p>This causes &#39;start&#39; events to be ignored. It also suppresses invocations of any default handler for start events. It is in most cases equivalent to $p-&gt;handler(start =&gt; sub {}), but is more efficient. It is different from the empty-sub-handler in that <code>skipped_text</code> is not reset by it.</p>

<pre><code>   $p-&gt;handler(start =&gt; undef);</code></pre>

<p>This causes no handler to be associated with start events. If there is a default handler it will be invoked.</p>

</dd>
</dl>

<p>Filters based on tags can be set up to limit the number of events reported. The main bottleneck during parsing is often the huge number of callbacks made from the parser. Applying filters can improve performance significantly.</p>

<p>The following methods control filters:</p>

<dl>

<dt id="$p-&gt;ignore_elements(-@tags-)"><a id="p--ignore_elements---tags"></a>$p-&gt;ignore_elements( @tags )</dt>
<dd>

<p>Both the <code>start</code> event and the <code>end</code> event as well as any events that would be reported in between are suppressed. The ignored elements can contain nested occurrences of itself. Example:</p>

<pre><code>   $p-&gt;ignore_elements(qw(script style));</code></pre>

<p>The <code>script</code> and <code>style</code> tags will always nest properly since their content is parsed in CDATA mode. For most other tags <code>ignore_elements</code> must be used with caution since HTML is often not <i>well formed</i>.</p>

</dd>
<dt id="$p-&gt;ignore_tags(-@tags-)"><a id="p--ignore_tags---tags"></a>$p-&gt;ignore_tags( @tags )</dt>
<dd>

<p>Any <code>start</code> and <code>end</code> events involving any of the tags given are suppressed. To reset the filter (i.e. don&#39;t suppress any <code>start</code> and <code>end</code> events), call <code>ignore_tags</code> without an argument.</p>

</dd>
<dt id="$p-&gt;report_tags(-@tags-)"><a id="p--report_tags---tags"></a>$p-&gt;report_tags( @tags )</dt>
<dd>

<p>Any <code>start</code> and <code>end</code> events involving any of the tags <i>not</i> given are suppressed. To reset the filter (i.e. report all <code>start</code> and <code>end</code> events), call <code>report_tags</code> without an argument.</p>

</dd>
</dl>

<p>Internally, the system has two filter lists, one for <code>report_tags</code> and one for <code>ignore_tags</code>, and both filters are applied. This effectively gives <code>ignore_tags</code> precedence over <code>report_tags</code>.</p>

<p>Examples:</p>

<pre><code>   $p-&gt;ignore_tags(qw(style));
   $p-&gt;report_tags(qw(script style));</code></pre>

<p>results in only <code>script</code> events being reported.</p>

<h2 id="Argspec">Argspec</h2>

<p>Argspec is a string containing a comma-separated list that describes the information reported by the event. The following argspec identifier names can be used:</p>

<dl>

<dt id="attr"><code>attr</code></dt>
<dd>

<p>Attr causes a reference to a hash of attribute name/value pairs to be passed.</p>

<p>Boolean attributes&#39; values are either the value set by $p-&gt;boolean_attribute_value, or the attribute name if no value has been set by $p-&gt;boolean_attribute_value.</p>

<p>This passes undef except for <code>start</code> events.</p>

<p>Unless <code>xml_mode</code> or <code>case_sensitive</code> is enabled, the attribute names are forced to lower case.</p>

<p>General entities are decoded in the attribute values and one layer of matching quotes enclosing the attribute values is removed.</p>

<p>The Unicode character set is assumed for entity decoding.</p>

</dd>
<dt id="@attr"><a id="attr1"></a><code>@attr</code></dt>
<dd>

<p>Basically the same as <code>attr</code>, but keys and values are passed as individual arguments and the original sequence of the attributes is kept. The parameters passed will be the same as the @attr calculated here:</p>

<pre><code>   @attr = map { $_ =&gt; $attr-&gt;{$_} } @$attrseq;</code></pre>

<p>assuming $attr and $attrseq here are the hash and array passed as the result of <code>attr</code> and <code>attrseq</code> argspecs.</p>

<p>This passes no values for events besides <code>start</code>.</p>

</dd>
<dt id="attrseq"><code>attrseq</code></dt>
<dd>

<p>Attrseq causes a reference to an array of attribute names to be passed. This can be useful if you want to walk the <code>attr</code> hash in the original sequence.</p>

<p>This passes undef except for <code>start</code> events.</p>

<p>Unless <code>xml_mode</code> or <code>case_sensitive</code> is enabled, the attribute names are forced to lower case.</p>

</dd>
<dt id="column"><code>column</code></dt>
<dd>

<p>Column causes the column number of the start of the event to be passed. The first column on a line is 0.</p>

</dd>
<dt id="dtext"><code>dtext</code></dt>
<dd>

<p>Dtext causes the decoded text to be passed. General entities are automatically decoded unless the event was inside a CDATA section or was between literal start and end tags (<code>script</code>, <code>style</code>, <code>xmp</code>, <code>iframe</code>, <code>title</code>, <code>textarea</code> and <code>plaintext</code>).</p>

<p>The Unicode character set is assumed for entity decoding. With Perl version 5.6 or earlier only the Latin-1 range is supported, and entities for characters outside the range 0..255 are left unchanged.</p>

<p>This passes undef except for <code>text</code> events.</p>

</dd>
<dt id="event"><code>event</code></dt>
<dd>

<p>Event causes the event name to be passed.</p>

<p>The event name is one of <code>text</code>, <code>start</code>, <code>end</code>, <code>declaration</code>, <code>comment</code>, <code>process</code>, <code>start_document</code> or <code>end_document</code>.</p>

</dd>
<dt id="is_cdata"><code>is_cdata</code></dt>
<dd>

<p>Is_cdata causes a TRUE value to be passed if the event is inside a CDATA section or between literal start and end tags (<code>script</code>, <code>style</code>, <code>xmp</code>, <code>iframe</code>, <code>title</code>, <code>textarea</code> and <code>plaintext</code>).</p>

<p>if the flag is FALSE for a text event, then you should normally either use <code>dtext</code> or decode the entities yourself before the text is processed further.</p>

</dd>
<dt id="length"><code>length</code></dt>
<dd>

<p>Length causes the number of bytes of the source text of the event to be passed.</p>

</dd>
<dt id="line"><code>line</code></dt>
<dd>

<p>Line causes the line number of the start of the event to be passed. The first line in the document is 1. Line counting doesn&#39;t start until at least one handler requests this value to be reported.</p>

</dd>
<dt id="offset"><code>offset</code></dt>
<dd>

<p>Offset causes the byte position in the HTML document of the start of the event to be passed. The first byte in the document has offset 0.</p>

</dd>
<dt id="offset_end"><code>offset_end</code></dt>
<dd>

<p>Offset_end causes the byte position in the HTML document of the end of the event to be passed. This is the same as <code>offset</code> + <code>length</code>.</p>

</dd>
<dt id="self"><code>self</code></dt>
<dd>

<p>Self causes the current object to be passed to the handler. If the handler is a method, this must be the first element in the argspec.</p>

<p>An alternative to passing self as an argspec is to register closures that capture $self by themselves as handlers. Unfortunately this creates circular references which prevent the HTML::Parser object from being garbage collected. Using the <code>self</code> argspec avoids this problem.</p>

</dd>
<dt id="skipped_text"><code>skipped_text</code></dt>
<dd>

<p>Skipped_text returns the concatenated text of all the events that have been skipped since the last time an event was reported. Events might be skipped because no handler is registered for them or because some filter applies. Skipped text also includes marked section markup, since there are no events that can catch it.</p>

<p>If an <code>&quot;&quot;</code>-handler is registered for an event, then the text for this event is not included in <code>skipped_text</code>. Skipped text both before and after the <code>&quot;&quot;</code>-event is included in the next reported <code>skipped_text</code>.</p>

</dd>
<dt id="tag"><code>tag</code></dt>
<dd>

<p>Same as <code>tagname</code>, but prefixed with &quot;/&quot; if it belongs to an <code>end</code> event and &quot;!&quot; for a declaration. The <code>tag</code> does not have any prefix for <code>start</code> events, and is in this case identical to <code>tagname</code>.</p>

</dd>
<dt id="tagname"><code>tagname</code></dt>
<dd>

<p>This is the element name (or <i>generic identifier</i> in SGML jargon) for start and end tags. Since HTML is case insensitive, this name is forced to lower case to ease string matching.</p>

<p>Since XML is case sensitive, the tagname case is not changed when <code>xml_mode</code> is enabled. The same happens if the <code>case_sensitive</code> attribute is set.</p>

<p>The declaration type of declaration elements is also passed as a tagname, even if that is a bit strange. In fact, in the current implementation tagname is identical to <code>token0</code> except that the name may be forced to lower case.</p>

</dd>
<dt id="token0"><code>token0</code></dt>
<dd>

<p>Token0 causes the original text of the first token string to be passed. This should always be the same as $tokens-&gt;[0].</p>

<p>For <code>declaration</code> events, this is the declaration type.</p>

<p>For <code>start</code> and <code>end</code> events, this is the tag name.</p>

<p>For <code>process</code> and non-strict <code>comment</code> events, this is everything inside the tag.</p>

<p>This passes undef if there are no tokens in the event.</p>

</dd>
<dt id="tokenpos"><code>tokenpos</code></dt>
<dd>

<p>Tokenpos causes a reference to an array of token positions to be passed. For each string that appears in <code>tokens</code>, this array contains two numbers. The first number is the offset of the start of the token in the original <code>text</code> and the second number is the length of the token.</p>

<p>Boolean attributes in a <code>start</code> event will have (0,0) for the attribute value offset and length.</p>

<p>This passes undef if there are no tokens in the event (e.g., <code>text</code>) and for artificial <code>end</code> events triggered by empty element tags.</p>

<p>If you are using these offsets and lengths to modify <code>text</code>, you should either work from right to left, or be very careful to calculate the changes to the offsets.</p>

</dd>
<dt id="tokens"><code>tokens</code></dt>
<dd>

<p>Tokens causes a reference to an array of token strings to be passed. The strings are exactly as they were found in the original text, no decoding or case changes are applied.</p>

<p>For <code>declaration</code> events, the array contains each word, comment, and delimited string starting with the declaration type.</p>

<p>For <code>comment</code> events, this contains each sub-comment. If $p-&gt;strict_comments is disabled, there will be only one sub-comment.</p>

<p>For <code>start</code> events, this contains the original tag name followed by the attribute name/value pairs. The values of boolean attributes will be either the value set by $p-&gt;boolean_attribute_value, or the attribute name if no value has been set by $p-&gt;boolean_attribute_value.</p>

<p>For <code>end</code> events, this contains the original tag name (always one token).</p>

<p>For <code>process</code> events, this contains the process instructions (always one token).</p>

<p>This passes <code>undef</code> for <code>text</code> events.</p>

</dd>
<dt id="text"><code>text</code></dt>
<dd>

<p>Text causes the source text (including markup element delimiters) to be passed.</p>

</dd>
<dt id="undef"><code>undef</code></dt>
<dd>

<p>Pass an undefined value. Useful as padding where the same handler routine is registered for multiple events.</p>

</dd>
<dt id="&#39;...&#39;"><a id="pod"></a><code>&#39;...&#39;</code></dt>
<dd>

<p>A literal string of 0 to 255 characters enclosed in single (&#39;) or double (&quot;) quotes is passed as entered.</p>

</dd>
</dl>

<p>The whole argspec string can be wrapped up in <code>&#39;@{...}&#39;</code> to signal that the resulting event array should be flattened. This only makes a difference if an array reference is used as the handler target. Consider this example:</p>

<pre><code>   $p-&gt;handler(text =&gt; [], &#39;text&#39;);
   $p-&gt;handler(text =&gt; [], &#39;@{text}&#39;]);</code></pre>

<p>With two text events; <code>&quot;foo&quot;</code>, <code>&quot;bar&quot;</code>; then the first example will end up with [[&quot;foo&quot;], [&quot;bar&quot;]] and the second with [&quot;foo&quot;, &quot;bar&quot;] in the handler target array.</p>

<h2 id="Events">Events</h2>

<p>Handlers for the following events can be registered:</p>

<dl>

<dt id="comment"><code>comment</code></dt>
<dd>

<p>This event is triggered when a markup comment is recognized.</p>

<p>Example:</p>

<pre><code>  &lt;!-- This is a comment -- -- So is this --&gt;</code></pre>

</dd>
<dt id="declaration"><code>declaration</code></dt>
<dd>

<p>This event is triggered when a <i>markup declaration</i> is recognized.</p>

<p>For typical HTML documents, the only declaration you are likely to find is &lt;!DOCTYPE ...&gt;.</p>

<p>Example:</p>

<pre><code>  &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;
      &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</code></pre>

<p>DTDs inside &lt;!DOCTYPE ...&gt; will confuse HTML::Parser.</p>

</dd>
<dt id="default"><code>default</code></dt>
<dd>

<p>This event is triggered for events that do not have a specific handler. You can set up a handler for this event to catch stuff you did not want to catch explicitly.</p>

</dd>
<dt id="end"><code>end</code></dt>
<dd>

<p>This event is triggered when an end tag is recognized.</p>

<p>Example:</p>

<pre><code>  &lt;/A&gt;</code></pre>

</dd>
<dt id="end_document"><code>end_document</code></dt>
<dd>

<p>This event is triggered when $p-&gt;eof is called and after any remaining text is flushed. There is no document text associated with this event.</p>

</dd>
<dt id="process"><code>process</code></dt>
<dd>

<p>This event is triggered when a processing instructions markup is recognized.</p>

<p>The format and content of processing instructions are system and application dependent.</p>

<p>Examples:</p>

<pre><code>  &lt;? HTML processing instructions &gt;
  &lt;? XML processing instructions ?&gt;</code></pre>

</dd>
<dt id="start"><code>start</code></dt>
<dd>

<p>This event is triggered when a start tag is recognized.</p>

<p>Example:</p>

<pre><code>  &lt;A HREF=&quot;http://www.perl.com/&quot;&gt;</code></pre>

</dd>
<dt id="start_document"><code>start_document</code></dt>
<dd>

<p>This event is triggered before any other events for a new document. A handler for it can be used to initialize stuff. There is no document text associated with this event.</p>

</dd>
<dt id="text1"><code>text</code></dt>
<dd>

<p>This event is triggered when plain text (characters) is recognized. The text may contain multiple lines. A sequence of text may be broken between several text events unless $p-&gt;unbroken_text is enabled.</p>

<p>The parser will make sure that it does not break a word or a sequence of whitespace between two text events.</p>

</dd>
</dl>

<h2 id="Unicode">Unicode</h2>

<p><code>HTML::Parser</code> can parse Unicode strings when running under perl-5.8 or better. If Unicode is passed to $p-&gt;parse() then chunks of Unicode will be reported to the handlers. The offset and length argspecs will also report their position in terms of characters.</p>

<p>It is safe to parse raw undecoded UTF-8 if you either avoid decoding entities and make sure to not use <i>argspecs</i> that do, or enable the <code>utf8_mode</code> for the parser. Parsing of undecoded UTF-8 might be useful when parsing from a file where you need the reported offsets and lengths to match the byte offsets in the file.</p>

<p>If a filename is passed to $p-&gt;parse_file() then the file will be read in binary mode. This will be fine if the file contains only ASCII or Latin-1 characters. If the file contains UTF-8 encoded text then care must be taken when decoding entities as described in the previous paragraph, but better is to open the file with the UTF-8 layer so that it is decoded properly:</p>

<pre><code>   open(my $fh, &quot;&lt;:utf8&quot;, &quot;index.html&quot;) || die &quot;...: $!&quot;;
   $p-&gt;parse_file($fh);</code></pre>

<p>If the file contains text encoded in a charset besides ASCII, Latin-1 or UTF-8 then decoding will always be needed.</p>

<h1 id="VERSION-2-COMPATIBILITY"><a id="VERSION"></a>VERSION 2 COMPATIBILITY</h1>

<p>When an <code>HTML::Parser</code> object is constructed with no arguments, a set of handlers is automatically provided that is compatible with the old HTML::Parser version 2 callback methods.</p>

<p>This is equivalent to the following method calls:</p>

<pre><code>    $p-&gt;handler(start   =&gt; &quot;start&quot;,   &quot;self, tagname, attr, attrseq, text&quot;);
    $p-&gt;handler(end     =&gt; &quot;end&quot;,     &quot;self, tagname, text&quot;);
    $p-&gt;handler(text    =&gt; &quot;text&quot;,    &quot;self, text, is_cdata&quot;);
    $p-&gt;handler(process =&gt; &quot;process&quot;, &quot;self, token0, text&quot;);
    $p-&gt;handler(
        comment =&gt; sub {
            my ($self, $tokens) = @_;
            for (@$tokens) { $self-&gt;comment($_); }
        },
        &quot;self, tokens&quot;
    );
    $p-&gt;handler(
        declaration =&gt; sub {
            my $self = shift;
            $self-&gt;declaration(substr($_[0], 2, -1));
        },
        &quot;self, text&quot;
    );</code></pre>

<p>Setting up these handlers can also be requested with the &quot;api_version =&gt; 2&quot; constructor option.</p>

<h1 id="SUBCLASSING">SUBCLASSING</h1>

<p>The <code>HTML::Parser</code> class is able to be subclassed. Parser objects are plain hashes and <code>HTML::Parser</code> reserves only hash keys that start with &quot;_hparser&quot;. The parser state can be set up by invoking the init() method, which takes the same arguments as new().</p>

<h1 id="EXAMPLES">EXAMPLES</h1>

<p>The first simple example shows how you might strip out comments from an HTML document. We achieve this by setting up a comment handler that does nothing and a default handler that will print out anything else:</p>

<pre><code>    use HTML::Parser ();
    HTML::Parser-&gt;new(
        default_h =&gt; [sub { print shift }, &#39;text&#39;],
        comment_h =&gt; [&quot;&quot;],
    )-&gt;parse_file(shift || die)
        || die $!;</code></pre>

<p>An alternative implementation is:</p>

<pre><code>    use HTML::Parser ();
    HTML::Parser-&gt;new(
        end_document_h =&gt; [sub { print shift }, &#39;skipped_text&#39;],
        comment_h      =&gt; [&quot;&quot;],
    )-&gt;parse_file(shift || die)
        || die $!;</code></pre>

<p>This will in most cases be much more efficient since only a single callback will be made.</p>

<p>The next example prints out the text that is inside the &lt;title&gt; element of an HTML document. Here we start by setting up a start handler. When it sees the title start tag it enables a text handler that prints any text found and an end handler that will terminate parsing as soon as the title end tag is seen:</p>

<pre><code>    use HTML::Parser ();

    sub start_handler {
        return if shift ne &quot;title&quot;;
        my $self = shift;
        $self-&gt;handler(text =&gt; sub { print shift }, &quot;dtext&quot;);
        $self-&gt;handler(
            end =&gt; sub {
                shift-&gt;eof if shift eq &quot;title&quot;;
            },
            &quot;tagname,self&quot;
        );
    }

    my $p = HTML::Parser-&gt;new(api_version =&gt; 3);
    $p-&gt;handler(start =&gt; \&amp;start_handler, &quot;tagname,self&quot;);
    $p-&gt;parse_file(shift || die) || die $!;
    print &quot;\n&quot;;</code></pre>

<p>More examples are found in the <i>eg/</i> directory of the <code>HTML-Parser</code> distribution: the program <code>hrefsub</code> shows how you can edit all links found in a document; the program <code>htextsub</code> shows how to edit the text only; the program <code>hstrip</code> shows how you can strip out certain tags/elements and/or attributes; and the program <code>htext</code> show how to obtain the plain text, but not any script/style content.</p>

<p>You can browse the <i>eg/</i> directory online from the <i>[Browse]</i> link on the http://search.cpan.org/~gaas/HTML-Parser/ page.</p>

<h1 id="BUGS">BUGS</h1>

<p>The &lt;style&gt; and &lt;script&gt; sections do not end with the first &quot;&lt;/&quot;, but need the complete corresponding end tag. The standard behaviour is not really practical.</p>

<p>When the <i>strict_comment</i> option is enabled, we still recognize comments where there is something other than whitespace between even and odd &quot;--&quot; markers.</p>

<p>Once $p-&gt;boolean_attribute_value has been set, there is no way to restore the default behaviour.</p>

<p>There is currently no way to get both quote characters into the same literal argspec.</p>

<p>Empty tags, e.g. &quot;&lt;&gt;&quot; and &quot;&lt;/&gt;&quot;, are not recognized. SGML allows them to repeat the previous start tag or close the previous start tag respectively.</p>

<p>NET tags, e.g. &quot;code/.../&quot; are not recognized. This is SGML shorthand for &quot;&lt;code&gt;...&lt;/code&gt;&quot;.</p>

<p>Incomplete start or end tags, e.g. &quot;&lt;tt&lt;b&gt;...&lt;/b&lt;/tt&gt;&quot; are not recognized.</p>

<h1 id="DIAGNOSTICS">DIAGNOSTICS</h1>

<p>The following messages may be produced by HTML::Parser. The notation in this listing is the same as used in <a href="https://metacpan.org/pod/perldiag">perldiag</a>:</p>

<dl>

<dt id="Not-a-reference-to-a-hash"><a id="Not"></a>Not a reference to a hash</dt>
<dd>

<p>(F) The object blessed into or subclassed from HTML::Parser is not a hash as required by the HTML::Parser methods.</p>

</dd>
<dt id="Bad-signature-in-parser-state-object-at-%p"><a id="Bad"></a><a id="Bad-signature-in-parser-state-object-at--p"></a>Bad signature in parser state object at %p</dt>
<dd>

<p>(F) The _hparser_xs_state element does not refer to a valid state structure. Something must have changed the internal value stored in this hash element, or the memory has been overwritten.</p>

</dd>
<dt id="_hparser_xs_state-element-is-not-a-reference"><a id="_hparser_xs_state"></a><a id="hparser_xs_state-element-is-not-a-reference"></a>_hparser_xs_state element is not a reference</dt>
<dd>

<p>(F) The _hparser_xs_state element has been destroyed.</p>

</dd>
<dt id="Can&#39;t-find-&#39;_hparser_xs_state&#39;-element-in-HTML::Parser-hash"><a id="Can"></a><a id="Can-t-find--_hparser_xs_state--element-in-HTML::Parser-hash"></a>Can&#39;t find &#39;_hparser_xs_state&#39; element in HTML::Parser hash</dt>
<dd>

<p>(F) The _hparser_xs_state element is missing from the parser hash. It was either deleted, or not created when the object was created.</p>

</dd>
<dt id="API-version-%s-not-supported-by-HTML::Parser-%s"><a id="API"></a><a id="API-version--s-not-supported-by-HTML::Parser--s"></a>API version %s not supported by HTML::Parser %s</dt>
<dd>

<p>(F) The constructor option &#39;api_version&#39; with an argument greater than or equal to 4 is reserved for future extensions.</p>

</dd>
<dt id="Bad-constructor-option-&#39;%s&#39;"><a id="Bad1"></a><a id="Bad-constructor-option--s"></a>Bad constructor option &#39;%s&#39;</dt>
<dd>

<p>(F) An unknown constructor option key was passed to the new() or init() methods.</p>

</dd>
<dt id="Parse-loop-not-allowed"><a id="Parse"></a>Parse loop not allowed</dt>
<dd>

<p>(F) A handler invoked the parse() or parse_file() method. This is not permitted.</p>

</dd>
<dt id="marked-sections-not-supported"><a id="marked"></a>marked sections not supported</dt>
<dd>

<p>(F) The $p-&gt;marked_sections() method was invoked in a HTML::Parser module that was compiled without support for marked sections.</p>

</dd>
<dt id="Unknown-boolean-attribute-(%d)"><a id="Unknown"></a><a id="Unknown-boolean-attribute--d"></a>Unknown boolean attribute (%d)</dt>
<dd>

<p>(F) Something is wrong with the internal logic that set up aliases for boolean attributes.</p>

</dd>
<dt id="Only-code-or-array-references-allowed-as-handler"><a id="Only"></a>Only code or array references allowed as handler</dt>
<dd>

<p>(F) The second argument for $p-&gt;handler must be either a subroutine reference, then name of a subroutine or method, or a reference to an array.</p>

</dd>
<dt id="No-handler-for-%s-events"><a id="No"></a><a id="No-handler-for--s-events"></a>No handler for %s events</dt>
<dd>

<p>(F) The first argument to $p-&gt;handler must be a valid event name; i.e. one of &quot;start&quot;, &quot;end&quot;, &quot;text&quot;, &quot;process&quot;, &quot;declaration&quot; or &quot;comment&quot;.</p>

</dd>
<dt id="Unrecognized-identifier-%s-in-argspec"><a id="Unrecognized"></a><a id="Unrecognized-identifier--s-in-argspec"></a>Unrecognized identifier %s in argspec</dt>
<dd>

<p>(F) The identifier is not a known argspec name. Use one of the names mentioned in the argspec section above.</p>

</dd>
<dt id="Literal-string-is-longer-than-255-chars-in-argspec"><a id="Literal"></a>Literal string is longer than 255 chars in argspec</dt>
<dd>

<p>(F) The current implementation limits the length of literals in an argspec to 255 characters. Make the literal shorter.</p>

</dd>
<dt id="Backslash-reserved-for-literal-string-in-argspec"><a id="Backslash"></a>Backslash reserved for literal string in argspec</dt>
<dd>

<p>(F) The backslash character &quot;\&quot; is not allowed in argspec literals. It is reserved to permit quoting inside a literal in a later version.</p>

</dd>
<dt id="Unterminated-literal-string-in-argspec"><a id="Unterminated"></a>Unterminated literal string in argspec</dt>
<dd>

<p>(F) The terminating quote character for a literal was not found.</p>

</dd>
<dt id="Bad-argspec-(%s)"><a id="Bad2"></a><a id="Bad-argspec--s"></a>Bad argspec (%s)</dt>
<dd>

<p>(F) Only identifier names, literals, spaces and commas are allowed in argspecs.</p>

</dd>
<dt id="Missing-comma-separator-in-argspec"><a id="Missing"></a>Missing comma separator in argspec</dt>
<dd>

<p>(F) Identifiers in an argspec must be separated with &quot;,&quot;.</p>

</dd>
<dt id="Parsing-of-undecoded-UTF-8-will-give-garbage-when-decoding-entities"><a id="Parsing"></a>Parsing of undecoded UTF-8 will give garbage when decoding entities</dt>
<dd>

<p>(W) The first chunk parsed appears to contain undecoded UTF-8 and one or more argspecs that decode entities are used for the callback handlers.</p>

<p>The result of decoding will be a mix of encoded and decoded characters for any entities that expand to characters with code above 127. This is not a good thing.</p>

<p>The recommended solution is to apply Encode::decode_utf8() on the data before feeding it to the $p-&gt;parse(). For $p-&gt;parse_file() pass a file that has been opened in &quot;:utf8&quot; mode.</p>

<p>The alternative solution is to enable the <code>utf8_mode</code> and not decode before passing strings to $p-&gt;parse(). The parser can process raw undecoded UTF-8 sanely if the <code>utf8_mode</code> is enabled, or if the <code>attr</code>, <code>@attr</code> or <code>dtext</code> argspecs are avoided.</p>

</dd>
<dt id="Parsing-string-decoded-with-wrong-endian-selection"><a id="Parsing1"></a>Parsing string decoded with wrong endian selection</dt>
<dd>

<p>(W) The first character in the document is U+FFFE. This is not a legal Unicode character but a byte swapped <code>BOM</code>. The result of parsing will likely be garbage.</p>

</dd>
<dt id="Parsing-of-undecoded-UTF-32"><a id="Parsing2"></a>Parsing of undecoded UTF-32</dt>
<dd>

<p>(W) The parser found the Unicode UTF-32 <code>BOM</code> signature at the start of the document. The result of parsing will likely be garbage.</p>

</dd>
<dt id="Parsing-of-undecoded-UTF-16"><a id="Parsing3"></a>Parsing of undecoded UTF-16</dt>
<dd>

<p>(W) The parser found the Unicode UTF-16 <code>BOM</code> signature at the start of the document. The result of parsing will likely be garbage.</p>

</dd>
</dl>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<p><a href="./HTML::Entities.html">HTML::Entities</a>, <a href="https://metacpan.org/pod/HTML::PullParser">HTML::PullParser</a>, <a href="./HTML::TokeParser.html">HTML::TokeParser</a>, <a href="https://metacpan.org/pod/HTML::HeadParser">HTML::HeadParser</a>, <a href="./HTML::LinkExtor.html">HTML::LinkExtor</a>, <a href="https://metacpan.org/pod/HTML::Form">HTML::Form</a></p>

<p><a href="./HTML::TreeBuilder.html">HTML::TreeBuilder</a> (part of the <i>HTML-Tree</i> distribution)</p>

<p><a href="http://www.w3.org/TR/html4/">http://www.w3.org/TR/html4/</a></p>

<p>More information about marked sections and processing instructions may be found at <a href="http://www.is-thought.co.uk/book/sgml-8.htm">http://www.is-thought.co.uk/book/sgml-8.htm</a>.</p>

<h1 id="COPYRIGHT">COPYRIGHT</h1>

<pre><code> Copyright 1996-2016 Gisle Aas. All rights reserved.
 Copyright 1999-2000 Michael A. Chase.  All rights reserved.</code></pre>

<p>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install HTML::Parser, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm HTML::Parser</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install HTML::Parser</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./HTML::Parser.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
